import 'dart:math';

import 'package:series_play/generated/assets.dart';

class CommConstant {
  CommConstant._();

  /// 是否是正式环境
  static const bool isRelease = false;
  /// 测试地址
  static const String devBaseUrl = 'http://180.165.26.188:19000';
  /// 正式地址
  static const String releaseBaseUrl = 'http://180.165.26.188:19000';

  static String get baseUrl => isRelease ? releaseBaseUrl : devBaseUrl;

  static List<String> get rankBadgeImgList => [
    Assets.imagesIcRankBadge1,
    Assets.imagesIcRankBadge2,
    Assets.imagesIcRankBadge3,
    Assets.imagesIcRankBadge4
  ];

  static List<String> fuckImgData = [
    'https://gd-hbimg.huaban.com/96e46a97ce93aa58a4501fe535115bb03c6a4e88775478-SiFYkm_fw240webp',
    'https://gd-hbimg.huaban.com/3ddc3e3b97c240de439ad7ad6ea4905af5508e8325fdc-C42NiI_fw240webp',
    'https://gd-hbimg.huaban.com/a1b794100147d4cda3c172ca7809152d9887677010d47b-6YIBoO_fw240webp',
    'https://gd-hbimg.huaban.com/613b668df46ae1d91f49d52836b57d4e72239cb6555b0c-ttLSd9_fw240webp',
    'https://gd-hbimg.huaban.com/7d6b86ac38a7e4f2fccab2a5c27a197cc45471458a25c-GjZDv8_fw240webp',
    'https://gd-hbimg.huaban.com/c8fa7d1f39bef1e769d89b070d081d7b3688864c18202-2eSNwd_fw240webp',
    'https://gd-hbimg.huaban.com/d35051e9298231a08b4609f5f2bcd42f2dbeff0279587-doZ3y0_fw240webp',
    'https://gd-hbimg.huaban.com/c9803fc5766e159d86e2a1bc4069789e07567312f1938-1iuaeA_fw240webp',
    'https://gd-hbimg.huaban.com/56feb128e9331b2f5da7022133a06211e1f650515cb69-YUlrkC_fw240webp',
    'https://gd-hbimg.huaban.com/b24dfb469c0e73b274c846329a0d3708fbd2659d1a750b-aGkRrD_fw240webp'
  ];

  static List<String> generateFuckData() {
    final random = Random();
    final result = <String>[];

    for (int i = 0; i < 20; i++) {
      final randomIndex = random.nextInt(fuckImgData.length);
      result.add(fuckImgData[randomIndex]);
    }

    return result;
  }
}